<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<script src="js/jquery-1.4.2.min.js" language="JavaScript"></script>
<style>
*{margin:0 ;padding:0}

input{
                border: 1px solid #ccc;
                padding: 7px 0px;
                border-radius: 3px;
                padding-left:5px;
				font-size:15px;
				text-align:center ;
                -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
                box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
                -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
                -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
                transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
            }

		input::-webkit-input-placeholder{text-align: center; font-size:15px; height:43px } 

            input:focus{
                    border-color: #66afe9;
                    outline: 0;
                    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
                    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
            }
			
				.sq{
			 border:1px solid #f0f0f0;
		     font-size:28px; 
			 height:50px; width:100%;
			 margin-top:1px;
		      }
			 .sq_left{
			     margin-left:3px;
			 width:52px;
			 float:left;
			 
			 }
			 .sq_right{
			    margin-left:2px;
			 width:78%;
			 float:left;
			 
			 }
		.txt1{   
		   
		     
		     font-size:20px;
			 margin-top:2px;
		
        }
		.txt2{  
		    font-size:15px;
			margin-top:2px;
			color:#7F7F7F;
        }  

</style>

 <div style="border:2px solid #f0f0f0; height:30px; width:100%">
         <div style="width:10%; float:left; margin-top:5px">  <img   onclick="backs()" src="image/back.png"   height="20px;" /></div>
	     <div  onclick="backss()" id="sqname" style="width:90%;  text-align:center ;float:left; font-size:20px;margin-top:0px"> </div>	
  </div>
    <div  id="search" style="margin-top:5px;">
       <input  style="width:100%;height:20px;" placeholder="搜索医生"/>
     </div>
	<div id="aa">
	</div>
<body>
</body>
</html>
<script>
   history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
        });
window.onload=function(){ 
var id='<%=request.getParameter("sqfwzx_id")%>';
id=id.substr(2,id.length-2);
var aj = $.ajax( {    
    url:'/QueyServlet',
    type:'get',    
    cache:false,  
	data:{op:'sqdoctor',sqfwzx_id:id},  
   dataType:'json',    
    success:function(msg) { 
	if(msg.result=="ok"){
	  var data=msg.data;
	var sqfwzx_id='<%=request.getParameter("sqfwzx_id")%>'
	$("#sqname").html(data[0].jname)
	for(var i=0 ;i<data.length;i++)  { 
	        
	   var  oDiv = document.createElement('div');
			oDiv.className ='sq';
            oDiv.id ='sq'+data[i].doctor_id;
			oDiv.onclick=function(){
			location="doctorinfo.jsp?doctor_id="+this.id+"&sqfwzx_id="+sqfwzx_id+""; 
			};
            document.getElementById("aa").appendChild(oDiv);
				
	  var  sq_left=document.createElement('div');
	       sq_left.className='sq_left'
		   oDiv.appendChild(sq_left);
		   
	  var  img=document.createElement('img');
	       img.style.height='50px'
		   img.style.width='50px'
	       img.src= data[i].doctor_tx;
		   sq_left.appendChild(img);
		   
	  var sq_right=document.createElement('div');
	      sq_right.className='sq_right'
		  oDiv.appendChild(sq_right);
		  
	  var txt1=document.createElement('div');
	      txt1.className ='txt1';
		  txt1.innerHTML = data[i].doctor_name;
		  sq_right.appendChild(txt1);
		  
      var txt2=document.createElement('div');
	      txt2.className ='txt2';
		  txt2.innerHTML =  data[i].ks_name+"、"+data[i].zw_name;
		  sq_right.appendChild(txt2);
		  }
	 }
	},
	  error : function() 
	 {     
         alert("异常！");    
    }    
});

}
function backss(){
location='community.jsp'; 


}
function backs(){
location='index.html'; 


}
</script>